package com.bl.student.api.controller.notice;

import com.bl.student.api.controller.BaseController;
import com.bl.student.common.ApiResponseBody;
import com.bl.student.dao.model.NoticeEntity;
import com.bl.student.service.biz.notice.NoticeService;
import com.bl.student.service.vo.tag.TagListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by yujingyi on 2018/1/29.
 */
@RestController
@Log4j2
@RequestMapping(value = {"/student/apis/notice"})
@Api(value = "通知", description = "通知")
public class NoticeController extends BaseController {
    @Autowired
    NoticeService noticeService;

    @ApiOperation(value = "通知", notes = "通知")
    @ApiImplicitParams({})
    @GetMapping(value = {"/get"})
    public ApiResponseBody<TagListVo> list(
            HttpServletRequest request) {

        NoticeEntity noticeEntity = noticeService.getNotice();

        return ApiResponseBody.createSuccessBody(noticeEntity);
    }


}
